Skip to content

Conversation

@infogulch
Copy link

@infogulch infogulch commented Oct 3, 2023

  • Only support using me. The 'extra flexibility' is unnecessary and distracting. If users want a different selector then they can edit it, it's only 12 lines of code.
  • Use data attributes to identify the parent scope id and select it; this is less likely to interact with existing css tooling and classes, and makes it easier to identify by eye.
  • Combine parent and child scope id assignment and currentScopeId increment, reducing the size of the script by 2 lines.
  • Only creates a parent's scope id once, multiple scoped style children will share the same id.
  • Adjust the regexes to be more selective about what to replace

@infogulch infogulch changed the title Only me; use dataset instead of class based selectors; simplify regex Use attribute based scoping instead of classes; small optimizaitons Oct 4, 2023
@infogulch infogulch closed this Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant